<meta charset="UTF-8" />

<head>
	<title>循环洞穴2 - Cavernous</title>
	<link rel="stylesheet" type="text/css" href="src/style.css" />
	<!--Dependencies-->
	<script type="text/javascript" defer src="dependencies/lz-string/lz-string.min.js"></script>
	<!--Game code-->
	<script type="text/javascript" defer src="dist/script/util.js"></script>
	<script type="text/javascript" defer src="dist/script/icons.js"></script>
	<script type="text/javascript" defer src="dist/script/settings.js"></script>
	<script type="text/javascript" defer src="dist/script/stats.js"></script>
	<script type="text/javascript" defer src="dist/script/stuff.js"></script>
	<script type="text/javascript" defer src="dist/script/actions.js"></script>
	<script type="text/javascript" defer src="dist/script/creatures.js"></script>
	<script type="text/javascript" defer src="dist/script/location_types.js"></script>
	<script type="text/javascript" defer src="dist/script/locations.js"></script>
	<script type="text/javascript" defer src="dist/script/realms.js"></script>
	<script type="text/javascript" defer src="dist/script/zone_routes.js"></script>
	<script type="text/javascript" defer src="dist/script/queues.js"></script>
	<script type="text/javascript" defer src="dist/script/zones.js"></script>
	<script type="text/javascript" defer src="dist/script/map.js"></script>
	<script type="text/javascript" defer src="dist/script/routes.js"></script>
	<script type="text/javascript" defer src="dist/script/grind_routes.js"></script>
	<script type="text/javascript" defer src="dist/script/highlights.js"></script>
	<script type="text/javascript" defer src="dist/script/runes.js"></script>
	<script type="text/javascript" defer src="dist/script/clones.js"></script>
	<script type="text/javascript" defer src="dist/script/loop_log.js"></script>
	<script type="text/javascript" defer src="dist/script/messages.js"></script>

	<script type="text/javascript" defer src="dist/script/main.js"></script>

	<script type="text/javascript" defer src="dist/script/test_util.js"></script>
	<script type="text/javascript" defer src="dist/script/test.js"></script>
</head>

<body>
<script src="chs.js"></script>
<script src="core.js"></script>
	<div id="templates">
		<div id="stat-template" class="stat block">
			<span class="name"></span>
			<span class="icon"></span>
			<span class="effect"></span>
			<div class="description"></div>
		</div>
		<div id="rune-template" class="stat block">
			<span class="name"></span>
			<span class="icon"></span>
			<span class="index"></span>
			<div class="description"></div>
		</div>
		<div id="stuff-template" class="stuff block">
			<div class="name"></div>
			<span class="count"></span>
			<span class="icon"></span>
			<div class="stuff-cut">
				<span class="count2"></span>
				<span class="icon2"></span>
			</div>
			<div class="description"></div>
		</div>
		<div id="action-template" class="action" onmouseover="showIntermediateLocation(event)"
			onmouseout="stopHovering()" onclick="setCursor(event, this)">
			<div class="character"></div>
		</div>
		<table>
			<tr id="row-template"></tr>
			<tr id="grind-row-template"></tr>
			<tr>
				<td id="cell-template"></td>
				<td id="grind-cell-template"></td>
			</tr>
		</table>
		<div id="queue-template" class="bottom-block" onclick="selectClone(this, event)">
			<div class="damage" style="width: 100%"></div>
			<div class="queue-inner" onclick="clearCursors(event, this)"></div>
			<div class="cursor"></div>
			<div class="work-progress"></div>
		</div>
		<div id="timeline-template" class="timeline"></div>
		<div id="zone-template" class="zone">
			<div class="name"></div>
			<div class="mana"></div>
			<div class="routes"></div>
		</div>
		<div id="realm-template" class="realm">
			<div class="name"></div>
			<div class="description"></div>
		</div>
		<div id="zone-route-template">
			<span class="actions"></span>
			<span class="mana"></span>
			<span class="require"></span>
			<span class="stuff"></span>
			<span class="delete-route"><span class="delete-route-inner">x</span></span>
		</div>
		<div id="message-link-template" class="message-link" onclick="viewMessage(event, this)"></div>
		<div id="log-entry-template" class="log-entry">
			<span class="name"></span>
			<span class="value"></span>
			<div class="description"></div>
		</div>
		<div id="stat-log-entry-template" class="log-entry">
			<span class="name"></span>
			<span>
				<span class="current-value"></span>
				(<span class="base-value"></span>)
			</span>
		</div>
		<div id="previous-log-template" class="log-entry previous">
			<span class="pin">♦</span>
			<span class="name"></span>
			<span class="value"></span>
		</div>
		<div id="loop-zone-template" class="loop-zone"></div>
	</div>
	<div class="vertical-blocks">
		<div id="options" class="vertical-block">
			<h3>Options</h3>
			<div id="options-inner">
				<div class="option block clickable" onclick="toggleBankedTime()">
					<span id="time-banked-toggle">Using</span> Time (B)
					<span id="time-banked">0</span>
					<div class="description">
						If you're offline or your computer runs slowly, time is banked (at 100% efficiency) - you can
						use it to speed up the game!
					</div>
				</div>
				<div class="option block clickable" onclick="toggleRunning()">
					<span id="running-toggle">Running</span> (P)
					<div class="description">Pause the game to more easily adjust your queue.</div>
				</div>
				<div class="option block clickable" onclick="toggleAutoRestart()">
					<span id="auto-restart-toggle">Wait when any complete</span> (<span id="auto-restart-key">W</span>)
					<div class="description">Restart to improve your skills when the queue is empty.</div>
				</div>
				<div class="option block clickable" onclick="resetLoop()">
					<span class="name">Travel back in time (R)</span>
					<div class="description">Return to your little room.</div>
				</div>
				<div id="grind-option" class="option block clickable" onclick="toggleGrindMana(event)" onmouseover="updateGrindStats()">
					<span id="grind-mana-toggle">Not grinding mana rocks</span> (G)
					<div class="description">
						Loops through your best paths to each mana rock.<br />
						Ctrl-click to reset all route times so all rocks will be revisited when grinding.<br />
						<b>Expected completions:</b>
						<table id="grind-stats-table">
							<tr id="grind-stats-header"></tr>
							<tbody id="grind-stats"></tbody>
							<tr id="grind-stats-footer"></tr>
							<tr><td><b>Legend:</b></td></tr>
							<tr><td class="failed" colspan="100" style="text-align: left;">Some route failed to load</td></tr>
							<tr><td class="drowned" colspan="100" style="text-align: left;">Some route was drowned</td></tr>
							<tr><td class="unreached" colspan="100" style="text-align: left;">Some mana rock unreached</td></tr>
							<tr><td class="revisit" colspan="100" style="text-align: left;">Some rock yet to be revisited</td></tr>
							<tr><td class="skipped" colspan="100" style="text-align: left;">Some rock skipped</td></tr>
						</table>
					</div>
				</div>
				<div id="stat-grind-option" class="option block clickable" onclick="toggleGrindStats(event)">
					<span id="grind-stat-toggle">Not grinding stats</span> (<span id="auto-stat-grind-key">S</span>)
					<div class="description">Each loop, loads the route that gives the most stats.</div>
				</div>
				<div class="option block clickable" onclick="toggleLoadPrereqs()">
					<span id="load-prereq-toggle">Load only zone route</span> (Q)
					<div class="description">Adjust what happens when clicking on a zone route.</div>
				</div>
				<h4 class="option-separator">Config</h4>
				<div class="option block clickable" onclick="viewMessages()">
					<span class="name">View messages</span>
					<div class="description">Reminisce about the 'story'.</div>
				</div>
				<div class="option block clickable" onclick="viewConfig()">
					<span class="name">View more config</span>
					<div class="description">There are a bunch more options.</div>
				</div>
				<div class="block">
					Mouse over to see key bindings.
					<div class="description big-description">
						Arrow keys to move<br />
						Space to act at your location<br />
						Backspace removes a command<br />
						1-6 to inscribe a rune<br />
						Ctrl-backspace clears the whole queue<br />
						Tab selects the next clone<br />
						Ctrl-Left/Right to move within a queue<br />
						Shift-Tab selects the previous clone<br />
						Ctrl-click and Ctrl-Shift-number selects multiple clones<br />
						Ctrl-A selects all clones<br />
						. to wait for 100ms<br />
						, to wait for longer<br />
						: or ; to insert a breakpoint which pauses the game<br />
						Home/End moves the cursor to the start/end of selected clones<br />
					</div>
				</div>
				<div onclick="displaySaveClick(event)">
					<div class="option block clickable" onclick="save()">
						<span class="name">Manually Save</span>
						<div class="description">The game automatically saves every time a reset occurs.</div>
					</div>
					<div class="option block clickable" ondblclick="deleteSave()">
						<span class="name">Clear Save (double click)</span>
						<div class="description">Are you sure you want to restart the game?</div>
					</div>
					<div class="option-row">
						<div class="option block clickable option--half-width" onclick="exportGame()">
							<span class="name">Export</span>
							<div class="description">This will put your save on your clipboard.</div>
						</div>
						<div class="option block clickable option--half-width" onclick="importGame()">
							<span class="name">Import</span>
							<div class="description">Paste your save in the box.</div>
						</div>
					</div>
					<div class="option-row">
						<div class="option block clickable option--half-width" onclick="exportQueues()">
							<span class="name">Export Queue</span>
							<div class="description">This will put your current queues on your clipboard.</div>
						</div>
						<div class="option block clickable option--half-width" onclick="importQueues()">
							<span class="name">Import Queue</span>
							<div class="description">Paste queues in the box.</div>
						</div>
					</div>
					<div class="option-row">
						<div class="option block clickable option--half-width" onclick="longExportQueues()">
							<span class="name">Long Export</span>
							<div class="description">This will put your current queues (all zones, this realm) on your clipboard.</div>
						</div>
						<div class="option block clickable option--half-width" onclick="longImportQueues()">
							<span class="name">Long Import</span>
							<div class="description">Paste queues for all zones in this realm in the box.</div>
						</div>
					</div>
				</div>
				<div class="option block clickable" onclick="currentLoopLog.display()">
					<span class="name">View loop log</span>
					<div class="description">Might be laggy if it's open while running.</div>
				</div>
			</div>
			<div class="version" title="By Nucaranlaeg">
				<a href="https://paypal.me/SamBenner" target="_blank">Paypal</a>
				<a href="https://discord.gg/EXAHXBr" target="_blank">Discord</a><br />
				Version <span id="version">2.7.13</span><br />
				©2021-2025
			</div>
		</div>
		<div id="stats" class="vertical-block">
			<h3>Stats</h3>
			<div class="clone-info">
				<h6>Selected Clone</h6>
				Health: <span class="health-amount"></span><br>
				<span class="action-name"></span><br>
				<span class="action-progress"></span> <small>clone-seconds</small>
			</div>
			<div class="queue-time">
				<div id="queue-actions">Actions: <span id="actions-spent"></span></div>
				<span class="barrier-related" id="barrier-mult">Barrier mult: <span id="current-barrier-mult">1</span><br></span>
				Zone time: <span id="time-spent-zone">0</span>s<br>
				Time spent: <span id="time-spent">0</span>s
			</div>
		</div>
		<div id="stuff" class="vertical-block">
			<h3>Stuff</h3>
			<div id="stuff-inner"></div>
			<div id="runes">
				<hr />
				<h3 title="Press the rune's number to insert it into your queue.">Runes</h3>
			</div>
		</div>
		<div id="map" class="vertical-block wide" onclick="viewCell(event.target)">
			<!-- <canvas id="mapCanvas" style="position:absolute;z-index:5;width:10px;height:10px;"></canvas> -->
			<h3>Map (<span id="zone-name">Zone 1</span>)</h3>
			<div id="realm-select"></div>
			<div id="zone-select"></div>
			<table id="map-inner"></table>
			<div id="map-legend" class="block">
				Map highlighting legend
				<div class="description">
					<div class="map-legend-item"><span class="map-legend-name">Clone position</span><table class="map-legend-icon"><tr><td class="tunnel occupied"></td></tr></table></div>
					<div class="map-legend-item"><span class="map-legend-name">Final queue position</span><table class="map-legend-icon"><tr><td class="limestone final-location"></td></tr></table></div>
					<div class="map-legend-item"><span class="map-legend-name">Cursor position</span><table class="map-legend-icon"><tr><td class="limestone cursor-location"></td></tr></table></div>
					<div class="map-legend-item"><span class="map-legend-name">Hovered action</span><table class="map-legend-icon"><tr><td class="limestone hover-location"></td></tr></table></div>
					<div class="map-legend-item"><span class="map-legend-name">Viewed cell</span><table class="map-legend-icon"><tr><td class="limestone selected-map-cell"></td></tr></table></div>
				</div>
			</div>
		</div>
		<div id="location" class="vertical-block">
			<div id="location-details">
				<h3>Selected Location</h3>
				<h4 id="location-name"></h4>
				<div id="location-description"></div>
				<div id="location-next"></div>
				<div id="location-water"></div>
				<button id="pathfind-button" onclick="adjustableKeybindings.KeyF()">Pathfind Here (F)</button>
				<div id="location-route">
					<button id="route-button" class="button" onclick="loadRoute(true)">
						Load best route to this rock
						<input type="hidden" id="x-loc" />
						<input type="hidden" id="y-loc" />
					</button>
					<div id="route-has-route">
						Route time: <span id="route-best-time"></span>s<br />
						Stuff used: <span id="route-requirements"><span class="require"></span></span><br />
						Est. mana left: <span id="route-best-mana-left"></span>s<br />
						Probably
						<span id="route-best-unminable" hidden>cannot be refined</span>
						<span id="route-best-minable">can be refined about <u>123</u> times<span hidden></span></span>
						right now<br />
						<span id="route-best-invalidated" hidden>Route values will be reset on the next visit.</span>
					</div>
					<div id="route-not-visited">There is no known routes to this location.</div>
					<div id="failed-route">There is no known valid route to this location - check your prerequisites!
					</div>
					<div id="dead-route">This route ends with all your clones dead!</div>
					<button id="delete-route-button">Forget route</button>
					<button id="nogrind-button">Grinding</button>
				</div>
			</div>
			<div class="bottom-vertical-block">
				<hr />
				<h3>Actions</h3>
				<div class="block-row">
					<div class="small-option block clickable" onclick="addActionToQueue('U')">
						<span id="add-action-up">🡅</span>
						<div class="description">Move up</div>
					</div>
					<div class="small-option block clickable" onclick="addActionToQueue('L')">
						<span id="add-action-left">🡄</span>
						<div class="description">Move left</div>
					</div>
					<div class="small-option block clickable" onclick="addActionToQueue('D')">
						<span id="add-action-down">🡇</span>
						<div class="description">Move down</div>
					</div>
					<div class="small-option block clickable" onclick="addActionToQueue('R')">
						<span id="add-action-right">🡆</span>
						<div class="description">Move right</div>
					</div>
					<div class="small-option block clickable" onclick="addActionToQueue('I')">
						<span id="add-action-interact">🞇</span>
						<div class="description">Interact</div>
					</div>
					<div class="small-option block clickable" onclick="addActionToQueue('T')">
						<span id="add-action-repeat-interact">🞇</span>
						<div class="description">Repeatedly Interact</div>
					</div>
				</div>
				<div class="block-row hidden-action">
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit1()">
						<span id="add-action-weaken">W</span>
						<div class="description">Weaken Rune</div>
					</div>
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit2()">
						<span id="add-action-wither">H</span>
						<div class="description">Wither Rune</div>
					</div>
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit3()">
						<span id="add-action-duplication">D</span>
						<div class="description">Duplication Rune</div>
					</div>
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit4()">
						<span id="add-action-teleport-to">T</span>
						<div class="description">Teleport To Rune</div>
					</div>
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit5()">
						<span id="add-action-teleport-from">F</span>
						<div class="description">Teleport From Rune</div>
					</div>
					<div class="small-option block clickable hidden-action" onclick="fixedKeybindings.Digit6()">
						<span id="add-action-pump">P</span>
						<div class="description">Pump Rune</div>
					</div>
				</div>
				<div class="block-row">
					<div class="small-option block clickable" onclick="adjustableKeybindings['Period']()">
						<span id="add-action-wait">.</span>
						<div class="description">Wait 100ms</div>
					</div>
					<div class="small-option block clickable" onclick="adjustableKeybindings['Comma']()">
						<span id="add-action-long-wait">,</span>
						<div class="description">Long wait (default 5000ms; see settings)</div>
					</div>
					<div class="small-option block clickable" onclick="adjustableKeybindings['>Semicolon']()">
						<span id="add-action-pause">:</span>
						<div class="description">Pause at this action</div>
					</div>
					<div class="small-option block clickable" onclick="fixedKeybindings['^KeyA']()">
						<span id="select-all">All</span>
						<div class="description">Select all</div>
					</div>
					<div class="small-option block clickable" onclick="fixedKeybindings.Backspace()">
						<span id="delete-action">&lt;=</span>
						<div class="description">Erase</div>
					</div>
					<div class="small-option block clickable" onclick="fixedKeybindings['^Backspace']()">
						<span id="delete-all-actions">X</span>
						<div class="description">Clear</div>
					</div>
				</div>
				<div class="option block clickable" onclick="addActionToQueue('<')">
					<span id="repeat-last-action">Repeat following action(s)</span>
					<div class="description">Repeat all actions after this action.</div>
				</div>
				<div class="block-row">
					<div class="small-option option block clickable" style="width: 45%" onclick="addActionToQueue('=')">
						Sync (=)
						<div class="description">If other clones have sync actions, wait until they're all on sync actions.</div>
					</div>
					<div class="small-option option block clickable" style="width: 45%" onclick="addActionToQueue('+')">
						No Sync (+)
						<div class="description">If a clone takes a No Sync action, it will not be considered for syncing with other clones for the rest of this zone until it takes another No Sync action.</div>
					</div>
				</div>
			</div>
		</div>
	</div>
	<div id="queues"></div>
	<div id="timelines"></div>
	<div id="message-box" onclick="hideMessages()" hidden>
		<div id="message-wrapper">
			<h3 id="message-title"></h3>
			<div id="message-text"></div>
		</div>
	</div>
	<div id="config-box" onclick="hideConfig()" hidden>
		<div id="config-wrapper" onclick="(event => event.stopPropagation())(event)">
			<div class="option block clickable" onclick="toggleFollowZone()">
				<span id="follow-zone-toggle">Follow on zone complete</span> (Z)
				<div class="description big-description">Adjust what happens when your clones exit the zone you're currently viewing.</div>
			</div>
			<div class="option block clickable" onclick="togglePauseOnPortal()">
				<span id="pause-on-portal-toggle">Do not pause on portal</span> (L)
				<div class="description big-description">Pause when your clones enter a new zone.</div>
			</div>
			<div class="option block clickable" onclick="findUsedZoneRoutes(true)">
				<span class="name">Check zone route usage</span>
				<div class="description big-description">
					For performance reasons, the blue shading on unused zone routes may not update frequently; this forces an update.
				</div>
			</div>
			<div class="option block clickable" onclick="toggleTimeline()">
				<span id="timeline-toggle">Showing timeline</span>
				<div class="description big-description">It's a neat feature, but it might be a little eye-grabbing.
				</div>
			</div>
			<div class="option block clickable" onclick="Route.invalidateRouteCosts()">
				<span class="name">Revisit all known mana rocks in this realm</span>
				<div class="description big-description">You can also ctrl-click on the Grind option.</div>
			</div>
			<div class="option block clickable" onclick="toggleWarnings()">
				<span id="warnings">Showing warnings</span>
				<div class="description big-description">The game warns on clearing queues.</div>
			</div>
			<div class="option block clickable" onclick="toggleUseWASD()">
				<span id="use-wasd-toggle">Use WASD</span>
				<div class="description big-description">Some people.</div>
			</div>
			<div class="option block clickable" onclick="toggleStatGrindPerSec()">
				<span id="stat-grind-per-sec">Stat grind strategy: Total</span>
				<div class="description big-description">Change whether stat grind routes are saved based on the best total gain or the best per second gain.</div>
			</div>
			<div class="option block enter-value">
				<span class="label" for="max-time">Max tick time (ms)</span>
				<input id="max-time" onblur="setMaxTickTime(this)" />
				<div class="description big-description">
					Minimum value is 250; set this lower if the game is choppy. The maximum speed is dependant on your base Mana or capped by this value.
				</div>
			</div>
			<div class="option block enter-value">
				<span class="label" for="long-wait">Long Wait action time (ms)</span>
				<input id="long-wait" onblur="setLongWaitTime(this)" />
				<div class="description big-description">
					Determines how long a long wait action (,) is.
				</div>
			</div>
			<div class="option block enter-value">
				<span class="label" for="min-stat-gain">Minimum stat gain for grinding</span>
				<input id="min-stat-gain" onblur="setMinimumStatGain(this)" />
				<div class="description big-description">
					When grinding stats (S), pause when expected stat gain is less than this number.
				</div>
			</div>
		</div>
	</div>
	</div>
	<div id="loop-log-box" onclick="hideLoopLog()" hidden>
		<div id="loop-log-wrapper">
			<h3>Current Run Stats</h3>
			<div>
				<span id="loop-log-zones"></span>
				<span id="load-loop-log">Load this route</span>
			</div>
			<div id="gold-vaporized">
				<span id="loop-gold-count"></span> gold vaporized for <span id="loop-gold-value"></span> mana
			</div>
			<div id="loop-prev">
				<div class="log-entry" style="font-weight: bold;"><span>Previous Runs</span></div>
				<div id="loop-prev-list"></div>
			</div>
			<div id="loop-stats"></div>
			<div id="loop-actions" class="timeline"></div>
		</div>
	</div>

</body>
<!--客服 开始-->
<script src="//g8hh.github.io/static/js/jquery.min.js"></script>
<link rel="stylesheet" href="//g8hh.github.io/static/css/kf.css" type="text/css" media="screen" charset="utf-8">
<script src="//g8hh.github.io/static/js/kf.js"></script>
<!-- 客服 结束 -->
<!--站长统计-->
   <div style="display: none"><script>
var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?f237591d5976f87ca2e06b38c3658d9c";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script>

    </div>

